package example.basic;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mvel.MVEL;

public class ArrayExample {
private static Log log = LogFactory.getLog(PropertyExample.class);
	
	public static void main(String[]args) {
		String result;
		Map vars = new HashMap();
		
		String[] arr = new String[2];
		arr[0] = "item0";
		arr[1] = "item1";
		
		vars = new HashMap();
		vars.put("arr", arr);

		result = "\n"
			+ "The array is: \n" 
			+ "arr[0]=" + (String)MVEL.eval("arr[0]", vars) + "\n"
			+ "arr[1]=" + (String)MVEL.eval("arr[1]", vars);
		log.info(result);
	}
}
